package com.ruoyi.map.service.impl;

import com.ruoyi.map.domain.FhMapFishprotection;
import com.ruoyi.map.mapper.FhMapFishprotectionMapper;
import com.ruoyi.map.service.IFhMapFishprotectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 保护鱼种管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class FhMapFishprotectionServiceImpl implements IFhMapFishprotectionService 
{
    @Autowired
    private FhMapFishprotectionMapper fhMapFishprotectionMapper;

    /**
     * 查询保护鱼种管理
     * 
     * @param id 保护鱼种管理主键
     * @return 保护鱼种管理
     */
    @Override
    public FhMapFishprotection selectFhMapFishprotectionById(Long id)
    {
        return fhMapFishprotectionMapper.selectFhMapFishprotectionById(id);
    }

    /**
     * 查询保护鱼种管理列表
     * 
     * @param fhMapFishprotection 保护鱼种管理
     * @return 保护鱼种管理
     */
    @Override
    public List<FhMapFishprotection> selectFhMapFishprotectionList(FhMapFishprotection fhMapFishprotection)
    {
        return fhMapFishprotectionMapper.selectFhMapFishprotectionList(fhMapFishprotection);
    }

    /**
     * 新增保护鱼种管理
     * 
     * @param fhMapFishprotection 保护鱼种管理
     * @return 结果
     */
    @Override
    public int insertFhMapFishprotection(FhMapFishprotection fhMapFishprotection)
    {
        return fhMapFishprotectionMapper.insertFhMapFishprotection(fhMapFishprotection);
    }

    /**
     * 修改保护鱼种管理
     * 
     * @param fhMapFishprotection 保护鱼种管理
     * @return 结果
     */
    @Override
    public int updateFhMapFishprotection(FhMapFishprotection fhMapFishprotection)
    {
        fhMapFishprotection.setUpdateTime(LocalDateTime.now());
        return fhMapFishprotectionMapper.updateFhMapFishprotection(fhMapFishprotection);
    }

    /**
     * 批量删除保护鱼种管理
     * 
     * @param ids 需要删除的保护鱼种管理主键
     * @return 结果
     */
    @Override
    public int deleteFhMapFishprotectionByIds(Long[] ids)
    {
        return fhMapFishprotectionMapper.deleteFhMapFishprotectionByIds(ids);
    }

    /**
     * 删除保护鱼种管理信息
     * 
     * @param id 保护鱼种管理主键
     * @return 结果
     */
    @Override
    public int deleteFhMapFishprotectionById(Long id)
    {
        return fhMapFishprotectionMapper.deleteFhMapFishprotectionById(id);
    }
}
